﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WindowsFormsApp4
{
    public class Helper
    {

        private static readonly string conString = "server=DESKTOP-POKOENF\\SQLEXPRESS;database=qq;uid=sa;pwd=123";
        public static DataTable GetDataTable(string cmdString)
        {
      
        SqlConnection sqlConnection = new SqlConnection(conString);

        SqlDataAdapter dataAdapter = new SqlDataAdapter(cmdString, conString);
        DataTable dt = new DataTable();
            sqlConnection.Open();

            dataAdapter.Fill(dt);

            return dt;
        }

        internal static object AddOrEditOrDeletesave(string sql)
        {
            throw new NotImplementedException();
        }

        internal static object GetDataTable(object sqlstu)
        {
            throw new NotImplementedException();
        }
    }
    
}
